﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>eLoan &copy; | @ViewBag.Title</title>

    <link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700' rel='stylesheet' type='text/css'>
    <!-- Add local styles, mostly for plugins css file -->
    @if (IsSectionDefined("Styles"))
        {@RenderSection("Styles", required: false)}
     
    <!-- Add jQuery Style direct - used for jQGrid plugin -->
    <link href="@Url.Content("~/Scripts/plugins/jquery-ui/jquery-ui.css")" rel="stylesheet" type="text/css" />

    <!-- Primary Inspinia style -->     
    @Styles.Render("~/Content/css")
    @Styles.Render("~/font-awesome/css")
    
</head>
<body>

    <!-- Skin configuration box -->
    <!-- @Html.Partial("_SkinConfig") -->

    <!-- Wrapper-->
    <!-- PageClass give you ability to specify custom style for specific view based on action -->
    <div id="wrapper">

        <!-- Navigation -->
        @Html.Partial("_Navigation")

        <!-- Page wraper -->
        <div id="page-wrapper" class="gray-bg @ViewBag.SpecialClass">

            <!-- Top Navbar -->
            @Html.Partial("_TopNavbar")

            <!-- Main view  -->
            @RenderBody()

            <!-- Footer -->
            @Html.Partial("_Footer")

        </div>
        <!-- End page wrapper-->

        <!-- Right Sidebar -->
        @Html.Partial("_RightSidebar")

    </div>
    <!-- End wrapper-->

    <!-- Section for main scripts render -->
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @Scripts.Render("~/plugins/slimScroll")
    @Scripts.Render("~/bundles/inspinia")
    
    <!-- Skin config script - only for demo purpose-->
    @Scripts.Render("~/bundles/skinConfig")

    <!-- Handler for local scripts -->
    
    @RenderSection("scripts", required: false)
</body>
</html>

<script type="text/javascript">

    $(document).ready(function () {
        //var fields = $('.scroll-field1');
        //Navigate(fields);

        //var fields2 = $('.scroll-field2');
        //Navigate(fields2);

        //var fields3 = $('.scroll-field3');
        //Navigate(fields3);

        for (var i = 1; i <= 6; i++)
        {
            var fields = $('.scroll-field' + i);
            Navigate(fields);
        }
    });

    function Navigate(collection) {
        collection.each(function (i, item) {

            $(item).keyup(function (e) {
                e = e || window.event;

                switch (e.keyCode) {
                    case 37:
                        {
                            break;
                        }
                    case 38:
                        {
                            var nextIndex = i != 0 ? i - 1 : collection.length - 1;
                            $(collection[nextIndex]).focus().select();
                            break;
                        }
                    case 39:
                        {
                            break;
                        }
                    case 40:
                        {
                            var nextIndex = i != (collection.length - 1) ? i + 1 : 0;
                            $(collection[nextIndex]).focus().select();
                            break;
                        }
                }

            });

        });
    }

</script>
